<?
class Rule_Russians extends Rule
{
	public $fields;
	public $error_message="Сообщения без русских букв недопустимы (защита от спама)";
	
	function __construct($name, $fields, $error_message="")
	{
		$this->name=$name;
		$this->fields=$fields;
		if($error_message!="") $this->error_message = $error_message;
	}
	
	function Check($hash)
	{
		foreach($this->fields as $name)
		{
			if(Misc::hasRus($hash[$name])) return true;
		}
		
		return false;
	}
}